package com.ruoyi.ctcx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceAttachmentRelateMapper;
import com.ruoyi.ctcx.domain.TbInsuranceAttachmentRelate;
import com.ruoyi.ctcx.service.ITbInsuranceAttachmentRelateService;

/**
 * 保险附件关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-25
 */
@Service
public class TbInsuranceAttachmentRelateServiceImpl implements ITbInsuranceAttachmentRelateService 
{
    @Autowired
    private TbInsuranceAttachmentRelateMapper tbInsuranceAttachmentRelateMapper;

    /**
     * 查询保险附件关联
     * 
     * @param id 保险附件关联主键
     * @return 保险附件关联
     */
    @Override
    public TbInsuranceAttachmentRelate selectTbInsuranceAttachmentRelateById(Long id)
    {
        return tbInsuranceAttachmentRelateMapper.selectTbInsuranceAttachmentRelateById(id);
    }

    /**
     * 查询保险附件关联列表
     * 
     * @param tbInsuranceAttachmentRelate 保险附件关联
     * @return 保险附件关联
     */
    @Override
    public List<TbInsuranceAttachmentRelate> selectTbInsuranceAttachmentRelateList(TbInsuranceAttachmentRelate tbInsuranceAttachmentRelate)
    {
        return tbInsuranceAttachmentRelateMapper.selectTbInsuranceAttachmentRelateList(tbInsuranceAttachmentRelate);
    }

    /**
     * 新增保险附件关联
     * 
     * @param tbInsuranceAttachmentRelate 保险附件关联
     * @return 结果
     */
    @Override
    public int insertTbInsuranceAttachmentRelate(TbInsuranceAttachmentRelate tbInsuranceAttachmentRelate)
    {
        return tbInsuranceAttachmentRelateMapper.insertTbInsuranceAttachmentRelate(tbInsuranceAttachmentRelate);
    }

    /**
     * 修改保险附件关联
     * 
     * @param tbInsuranceAttachmentRelate 保险附件关联
     * @return 结果
     */
    @Override
    public int updateTbInsuranceAttachmentRelate(TbInsuranceAttachmentRelate tbInsuranceAttachmentRelate)
    {
        return tbInsuranceAttachmentRelateMapper.updateTbInsuranceAttachmentRelate(tbInsuranceAttachmentRelate);
    }

    /**
     * 批量删除保险附件关联
     * 
     * @param ids 需要删除的保险附件关联主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceAttachmentRelateByIds(Long[] ids)
    {
        return tbInsuranceAttachmentRelateMapper.deleteTbInsuranceAttachmentRelateByIds(ids);
    }

    /**
     * 删除保险附件关联信息
     * 
     * @param id 保险附件关联主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceAttachmentRelateById(Long id)
    {
        return tbInsuranceAttachmentRelateMapper.deleteTbInsuranceAttachmentRelateById(id);
    }

    /**
     * 根据保险id删除关联表
     * @param mainId
     */
    @Override
    public void deleteRelateByMainId(String mainId) {
        tbInsuranceAttachmentRelateMapper.deleteRelateByMainId(mainId);
    }
}
